<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>

<jsp:include page="/includes/top.jsp"></jsp:include>
<div class="page-header">
	<h1></h1>
</div>
<!-- /.page-header -->
<div class="row">
	<div class="col-xs-12">
		<div class="col-sm-6">
			<div class="row">
				<div
					class="col-xs-11 label label-lg label-info arrowed-in arrowed-right">
					<b>详细信息</b>
				</div>
			</div>
			<div class="row">
				<ul class="list-unstyled spaced" id="divul">
					<li><i class="icon-caret-right blue"></i>项目名称:&nbsp;&nbsp;&nbsp;<b class="c1"></b></li>
					<li><i class="icon-caret-right blue"></i>项目简称:&nbsp;&nbsp;&nbsp;<b class="c2"></b></li>
					<li><i class="icon-caret-right blue"></i>公司名称 :&nbsp;&nbsp;&nbsp;<b class="c3"></b></li>
					<li><i class="icon-caret-right blue"></i>项目负责人:&nbsp;&nbsp;&nbsp;<b class="c4"></b></li>
					<li><i class="icon-caret-right blue"></i>网址:&nbsp;&nbsp;&nbsp;<b class="c5"></b></li>
					<li><i class="icon-caret-right blue"></i>主导部门:&nbsp;&nbsp;&nbsp;<b class="c6"></b></li>
					<li><i class="icon-caret-right blue"></i>开始日期:&nbsp;&nbsp;&nbsp;<b class="c7"></b></li>
					<li><i class="icon-caret-right blue"></i>预计完成日期:&nbsp;&nbsp;&nbsp;<b class="c8"></b></li>
				</ul>
			</div>
		</div>
		<!-- /span -->
		<div class="col-sm-6">
			<div class="row">
				<div
					class="col-xs-11 label label-lg label-success arrowed-in arrowed-right">
					<b>概要</b>
				</div>
			</div>
			<div>
				<ul class="list-unstyled spaced">
					<li><i class="icon-caret-right blue"></i>项目类型:&nbsp;&nbsp;&nbsp;<b class="t1"></b></li>
					<li><i class="icon-caret-right blue"></i>状态:&nbsp;&nbsp;&nbsp;<b	class="t2"></b></li>
					<li><i class="icon-caret-right blue"></i>优先级:&nbsp;&nbsp;&nbsp;<b class="t3"></b></li>
					<li><i class="icon-caret-right blue"></i>预算:&nbsp;&nbsp;&nbsp;<b class="t4"></b></li>
					<li><i class="icon-caret-right blue"></i>实际支出:&nbsp;&nbsp;&nbsp;<b	class="t5"></b></li>
					<li><i class="icon-caret-right blue"></i>完成情况:&nbsp;&nbsp;&nbsp;<b class="t6"></b></li>
					<li><i class="icon-caret-right blue"></i>样例(URL):&nbsp;&nbsp;&nbsp;<b class="t7"></b></li>
					<li><i class="icon-caret-right blue"></i>项目网址(URL):&nbsp;&nbsp;&nbsp;<b class="t8"></b></li>
				</ul>
			</div>
		</div>
		<!-- /span -->
	</div>
</div>
<div class="row">
	<div class="col-xs-12">
		<ul class="nav nav-tabs">
			<li class="active"><a href="#tabs-1" data-toggle="tab">任务</a></li>
		</ul>
		<div class="tab-content">
			<div id="tabs-1" class="tab-pane fade in active">
				<div class="table-responsive">
					<table id="grid-table"
						class="table table-striped table-bordered table-hover">
						<thead>
							<tr>
								<th style="width:2%"><input type="checkbox" id="checkAll"
									class="ace"><span class="lbl"></span></th>
								<th style="width:20%">进度</th>
								<th>任务名称</th>
								<th style="width:25%">任务描述</th>
								<th>任务所有者</th>
								<th>开始日期</th>
								<th>完成日期</th>
								<th>期限</th>
								<th>优先级</th>
							</tr>
						</thead>
					</table>
				</div>
			</div>
		</div>
	</div>
</div>

<jsp:include page="/includes/bottom.jsp"></jsp:include>

<Script type="text/javascript">
	var proid = getQueryString("id");
	
	$.ajax({
		type : "post",
		url : "getprojects",
		data : {'projects.projectId':proid},
		success : function(data) {
			if (typeof (data) == "object") {
				$(".c1").html(data.projectName);
				$(".c2").html(data.projectShortName);
				$(".c3").html(data.projectCompanyName);
				$(".c4").html(data.projectName);
				$(".c5").html(data.projectUrl);
				$(".c6").html(data.projectDepartmentName);
				$(".c7").html(data.projectStartDate);
				$(".c8").html(data.projectEndDate);
				$(".t1").html(data.projectTypeName);
				$(".t2").html(data.projectStatusName);
				$(".t3").html(data.projectPriorityName);
				$(".t4").html(data.projectTargetBudget);
				$(".t5").html(data.projectActualBudget);
				$(".t6").html(data.projectPercentComplete+"%");
				$(".t7").html(data.projectUrl);
				$(".t8").html(data.projectDemoUrl);
			}
		}
	});
	
	var columns = [
						{
							"data" : "taskId",
							"fnCreatedCell" : function(nTd, sData, oData, iRow, iCol) {
								$(nTd).html("<input type='checkbox' name='checkList' value='" + sData + "' class='ace'><span class='lbl'></span>");
							}
						},
						{
							"data" : "taskPercentComplete",
							"fnCreatedCell" : function(nTd, sData, oData, iRow, iCol) {
								$(nTd).html("<div class='progress progress-striped'> "
														+ "<div class='progress-bar progress-bar-success' role='progressbar' "
														+ "aria-valuenow='"
														+ oData.taskPercentComplete
														+ "' aria-valuemin='0' aria-valuemax='100' style='width: "
														+ oData.taskPercentComplete
														+ "%;'>" + "<span >"
														+ oData.taskPercentComplete
														+ "%</span> </div></div>");
							}
						},  
						{
							"data" : "taskName"
						},  {
							"data" : "taskDescription"
						}, {
							"data" : "taskOwnerName"
						}, {
							"data" : "taskStartDate"
						}, {
							"data" : "taskEndTime"
						}, {
							"data" : "taskDuration"
						}, {
							"data" : "taskPriorityName"
						}];
	var dataMap = {'proid':proid};
	//参数说明：id,url,data,column,length			
	tableload("grid-table","taskid",dataMap,columns,15);
	$("div.toolbar").html("");
	function _addFun(){}
	function _editFun(){}
	function _delFun(){}
</Script>